package com.chushouya.product.dto.admin.product;

import com.chushouya.common.constant.ProductStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel("商品列表")
public class ProductListDTO {

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("商品编码")
    private String productCode;

    @ApiModelProperty("商品名称(短名称)")
    private String productName;

    @ApiModelProperty("主图")
    private String productImage;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("品牌名称")
    private String brandName;

    @ApiModelProperty("系列名称")
    private String seriesName;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("最高估价")
    private BigDecimal maxPrice;

    @ApiModelProperty("已拆封最高估价")
    private BigDecimal openedMaxPrice;

    @ApiModelProperty("状态 0下架，1上架")
    private Integer status;

    @ApiModelProperty("状态")
    private String statusDesc;

    public String getStatusDesc() {
        return ProductStatusEnum.getDesc(this.status);
    }

}
